params = {
    "client_num": 6,
    "caregiver_num": 7,
    "population_size": 50,
    "crossover_rate": 0.3,
    "mutation_rate": 0.115,
    "phenotype_limit": 200,
    "elimination_size": 5,
    "initial_temperature": 100.0,
    "cooling_rate": 0.995,
    "time_slots_per_day": 72,
    "time_interval_minutes": 20,
    "caregiver_availability_weight": 0.3,
    "scheduling_conflict_penalty": 50,
    "unassigned_slot_penalty": 30,
    "use_algorithm_optimization": True,
    "rl_learning_rate": 0.1,
    "rl_discount_factor": 0.9,
    "rl_exploration_rate": 0.1,
    "rl_exploration_decay": 0.995,
    "rl_min_exploration_rate": 0.01,
}

# 添加三班制排班相关配置
shift_config = {
    "morning_shift": {
        "start_time": "06:05",
        "end_time": "14:00",
        "name": "班次1",
        "order": 1,
    },
    "afternoon_shift": {
        "start_time": "14:06",
        "end_time": "22:07",
        "name": "班次2",
        "order": 2,
    },
    "night_shift": {
        "start_time": "22:09",
        "end_time": "06:07",
        "name": "班次3",
        "order": 3,
    },
}

# 护理员白天/夜班分配的权重比（默认为黄金分割比1.618）
day_night_ratio = 1.618

# 预留护理资源比例，用于应对新入住老人的临时需求
reserve_resource_ratio = 0.1

# 班制控制参数
shift_control = {
    "enabled_shifts": [
        "morning_shift",
        "afternoon_shift",
        "night_shift",
    ],
    "min_shifts_per_day": 1,
    "max_shifts_per_day": 3,
    "allow_empty_shifts": True,
    "shift_sort_method": "time",
    "auto_adjust_time": True,
}

# 三班制排班接口全局参数
three_shift_params = {
    "schedule_type": 1,
    "start_date": "2025-09-25",
    "num_days": 3,
    "shift_start_time": "09:09",
    "shift_mode": 3,
    "custom_shifts": [
        1,
        3,
    ],
    "time_slots_per_day": 72,
    "time_interval_minutes": 20,
    "day_segments": 3,
    "param_priority_enabled": True,
    "allow_cross_day": True,
    "use_fixed_shift_times": True,
    "auto_schedule_enabled": False,
    "auto_schedule_immediate": True,
    "auto_schedule_minutes": 1,
    "auto_schedule_generate_care_timeline": True,
    "auto_schedule_shift_mode": 3,
    "auto_schedule_time_slots_per_day": 72,
    "auto_schedule_time_interval_minutes": 20,
}

# 班制模式配置
shift_mode_config = {
    "one_shift": {
        "name": "一班制",
        "shifts": [
            "morning_shift",
        ],
        "description": "全天24小时一个班次",
        "hours_per_shift": 24.0,
    },
    "two_shift": {
        "name": "二班制",
        "shifts": [
            "morning_shift",
            "night_shift",
        ],
        "description": "全天分为两个班次，每班12小时",
        "hours_per_shift": 12.0,
    },
    "three_shift": {
        "name": "三班制",
        "shifts": [
            "morning_shift",
            "afternoon_shift",
            "night_shift",
        ],
        "description": "全天分为三个班次，每班8小时",
        "hours_per_shift": 8.0,
    },
    "custom": {
        "name": "自定义班制",
        "shifts": [],
        "description": "自定义班次数量和时间",
        "hours_per_shift": None,
    },
}

# 护理员休息时间控制参数
rest_time_control = {
    "min_rest_between_shifts": 8,
    "min_rest_after_night_shift": 12,
    "max_consecutive_shifts": 3,
    "shift_transition_rest": {
        "morning_shift_to_afternoon_shift": 8,
        "afternoon_shift_to_night_shift": 10,
        "night_shift_to_morning_shift": 12,
        "morning_shift_to_night_shift": 16,
        "afternoon_shift_to_morning_shift": 8,
        "night_shift_to_afternoon_shift": 10,
    },
    "max_weekly_work_hours": 40,
    "max_weekly_night_shifts": 3,
    "require_weekend_rest": True,
    "max_weekend_shifts_per_month": 2,
    "balance_shift_distribution": True,
    "rotation_pattern": "forward",
}
